package org.geek.week1.homework2;

import java.io.FileInputStream;
import java.io.FileOutputStream;

/**
 * @author wangnan
 * @create 2021/9/18
 */
public class EncodeHello {
    public static void main(String[] args) throws Exception {
        FileInputStream resourceAsStream = new FileInputStream("temp/Hello.class");
        byte[] b=new byte[resourceAsStream.available()];
        byte[] bx=new byte[resourceAsStream.available()];
        resourceAsStream.read(b, 0, b.length);
        for (int i = 0; i < b.length; i++) {
            final byte v = b[i];
            bx[i]=(byte)(255-v);
        }
        FileOutputStream writer = new FileOutputStream("temp/Hello.xlass");
        writer.write(bx);
        writer.close();
    }
}
